package com.example.springeventlistenersample;

import org.springframework.context.ApplicationEvent;

/**
 * spring传递的事件
 *
 */

public class SpringEvent1 extends ApplicationEvent {


    private final UserInfo data;//这个是事件传递的真实业务字段

    public SpringEvent1(Object source, UserInfo data) {
        super(source);
        this.data = data;
    }

    public UserInfo getData() {
        return data;
    }
}
